package com.qinghong.server.controller;

import com.qinghong.server.entity.User;
import com.qinghong.server.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class TestController {

    @Resource
    private UserService userService;

    @GetMapping("test")
    public String test(){
        return "success";
    }

    @GetMapping("/users")
    public List<User> users(){
        return userService.list();
    }

}
